//当前模块获取的是品牌管理的模块
import request from '@/utils/request'
//  /admin/product/baseTrademark/{page}/{limit}
export const reqTradeMarkList = (page, limit) => request({ url: `/admin/product/baseTrademark/${page}/${limit}`, method: 'get' })

//处理添加品牌  /admin/product/baseTrademark/save   post "logoUrl": "string",  "tmName": "string"
//修改品牌 /admin/product/baseTrademark/update  put    参数:id logoUrl tmName
export const reqAddOrUpdateTradeMark = (tradeMark) => {
    //判断是否有id,有id则是修改品牌,无id则是新增品牌
    if (tradeMark.id) {
        return request({ url: '/admin/product/baseTrademark/update', data: tradeMark, method: 'put' })
    } else {
        return request({ url: '/admin/product/baseTrademark/save', data: tradeMark, method: 'post' })
    }
}

//删除品牌  /admin/product/baseTrademark/remove/{id} detele
export const reqDeteleTradeMark = (id) => request({url:`/admin/product/baseTrademark/remove/${id}`,method:'DELETE'})















